<template>
  <div>考勤
    <button @click="btn(-1)">-</button><input type="text" :value="value"><button @click="btn(+1)">+</button>
  </div>
</template>

<script>
export default {
  name: 'HmNum',
  model: {
    prop: 'value',
    event: 'input'
  },
  props: {

    value: {
      type: Number,
      default: 1
    }
  },
  methods: {
    btn(num) {
      this.$emit('input', this.value + num)
    }
  }
}
</script>

<style>

</style>
